#################################################################################
#                                                                               #
#                                                                               #
#                              GraphicsDevPkg                                   #
#                        Makefile For cconv Library                             #
#                                                                               #
#                                                                               #
#                                                                               #
#################################################################################


# COMPILER USED
CC= g++
AR= ar


# GENERAL DEFINITIONS
INCLUDE_DIR   = ../../../include
LIBRARY_DIR   = ../../../lib/linux
SRC_CCONV_DIR = ../../../src/cconv
OBJ_CCONV_DIR = ./Debug
LIBRARY = libcconv.a



# CCONV LIBRARY DEFINITIONS
SRC_CCONV = $(wildcard $(SRC_CCONV_DIR)/*.cpp)
OBJ_CCONV = $(SRC_CCONV:$(SRC_CCONV_DIR)/%.cpp=$(OBJ_CCONV_DIR)/%.o)
CFLAGS_CCONV = 
LFLAGS_CCONV = 



all: cconv

cconv: $(OBJ_CCONV) Makefile
	@echo 'cconv: Creating cconv Library ...'
	@$(AR) rcs $(LIBRARY_DIR)/$(LIBRARY) $(OBJ_CCONV)


$(OBJ_CCONV_DIR)/%.o: $(SRC_CCONV_DIR)/%.cpp Makefile
	@echo 'cconv: generating object file "$@" ...'
	@$(CC) -I $(INCLUDE_DIR) -c $< -o $@



# CLEAN
clean: cleanup
	@rm -f $(OBJ_CCONV)
	@rm -f $(LIBRARY_DIR)/$(LIBRARY)
	@echo 'cconv: Removing object Files'
	@echo 'cconv: Removing Library'

#CLEANUP
cleanup:
	@rm -f $(SRC_CCONV_DIR)/*~
	@rm -f ./*~
	@echo 'cconv: Removing *~ files'




